GCC = g++
CPPFLAGS = -g -finline-functions -Wall -Winline -pipe -DOS_LINUX
HEAD_INFO = -DPROJECT_NAME="\"FASTSEARCH\"" -DDESCRIPTION="\"FastSearch indexer\""
	  
INCLUDES = -I./ -I../../common/commonlib/output/include \
	   -I./ -I../../common/ictclas/ \
	   -I../../common/sparsehash/include \
	   -I../../common/termindex \
	   -I../../common/sign/ \
	   -I../../common/descriptorManager/ \
	   -I../unitResource/ \
	   -I../common/

LIBS     = -L./ -L../../common/commonlib/output/lib -lcommonlib \
	   -L../../common/ictclas/ -lICTCLAS2011 \
	   -L../../common/sign/ -lsign \
	   -L../../common/descriptorManager/ -ldescriptorManager \
	   -L../unitResource/ -lunitResource \
	   -lpthread

all :forwarder

forwarder : textWei.o forwarder.o recordProcessor.o display.o
	$(GCC) -o $@ $^ $(INCLUDES) $(HEAD_INFO) $(LIBS)

%.o : %.cpp
	$(GCC) $(CPPFLAGS) $(HEAD_INFO) -c $< -o $@ $(INCLUDES)

clean :
	rm -f *.o
	rm -f forwarder

